package com.calvin.study;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

import com.calvin.study.interceptor.LoginInterceptor;

@SpringBootApplication
public class SsoClientUserApp   {
	
	@Bean
	public RestTemplate restTemplate() {
		return new RestTemplate();
	}
	
	@Bean // 表示将拦截器放到IoC容器中
	public LoginInterceptor loginInterceptor() {
		return new LoginInterceptor();
	}
	
	public static void main(String[] args) {
		SpringApplication.run(SsoClientUserApp.class, args);
	}
}
